package com.woniuxy.seata.storage.service.impl;

import com.woniuxy.seata.storage.mapper.StorageMapper;
import com.woniuxy.seata.storage.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 作者
 * @create 2025-07-03 14:46
 */
@Service
public class StorageServiceImpl implements StorageService {

    @Autowired
    private StorageMapper storageMapper;

    @Override
    public void deduct(String commodityCode, int count) {
//        if(true){
//            throw new RuntimeException("storage-service-exception");
//        }
        storageMapper.update(commodityCode, count);
    }
}
